import pymysql

def get_base_connection():
    return pymysql.connect(host="localhost", user="root", password="123", db="stu", charset="utf8")

def get_dict_connection():
    return pymysql.connect(host="localhost", user="root", password="123",
                           db="stu", charset="utf8",cursorclass=pymysql.cursors.DictCursor)